using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using bitzhuwei.Compiler;

namespace bitzhuwei.AnsiCFormat {
    /// <summary>
    /// Correspond to the Vn node selection_statement in the grammar(AnsiC).
    /// </summary>
    internal abstract partial class Vnselection_statement : Vnstatement {


        /// <summary>
        /// [191]=selection_statement : 'if' '(' expression ')' statement ;
        /// </summary>
        public class if_ : Vnselection_statement {
            private readonly Token r4;
            private readonly Token r3;
            private readonly Vnexpression r2;
            private readonly Token r1;
            private readonly Vnstatement r0;

            /// <summary>
            /// [191]=selection_statement : 'if' '(' expression ')' statement ;
            /// </summary>
            /// <param name="r4"></param>
            /// <param name="r3"></param>
            /// <param name="r2"></param>
            /// <param name="r1"></param>
            /// <param name="r0"></param>
            public if_(Token r4/* reserved word is omissible */
                , Token r3/* reserved word is omissible */
                , Vnexpression r2
                , Token r1/* reserved word is omissible */
                , Vnstatement r0) {
                this.r4 = r4;
                this.r3 = r3;
                this.r2 = r2;
                this.r1 = r1;
                this.r0 = r0;
                this._scope = new TokenRange(r4, r0);
            }

            private TokenRange _scope;
            public override TokenRange Scope => _scope;

            public override void Format(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override void FullFormat(BlankConfig preConfig, TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override IEnumerable<string> YieldTokens(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }
        }
        /// <summary>
        /// [192]=selection_statement : 'if' '(' expression ')' statement 'else' statement ;
        /// </summary>
        public class ifelse_ : Vnselection_statement {
            private readonly Token r6;
            private readonly Token r5;
            private readonly Vnexpression r4;
            private readonly Token r3;
            private readonly Vnstatement r2;
            private readonly Token r1;
            private readonly Vnstatement r0;

            /// <summary>
            /// [192]=selection_statement : 'if' '(' expression ')' statement 'else' statement ;
            /// </summary>
            /// <param name="r6"></param>
            /// <param name="r5"></param>
            /// <param name="r4"></param>
            /// <param name="r3"></param>
            /// <param name="r2"></param>
            /// <param name="r1"></param>
            /// <param name="r0"></param>
            public ifelse_(Token r6/* reserved word is omissible */
                , Token r5/* reserved word is omissible */
                , Vnexpression r4
                , Token r3/* reserved word is omissible */
                , Vnstatement r2
                , Token r1/* reserved word is omissible */
                , Vnstatement r0) {
                this.r6 = r6;
                this.r5 = r5;
                this.r4 = r4;
                this.r3 = r3;
                this.r2 = r2;
                this.r1 = r1;
                this.r0 = r0;
                this._scope = new TokenRange(r6, r0);
            }

            private TokenRange _scope;
            public override TokenRange Scope => _scope;

            public override void Format(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override void FullFormat(BlankConfig preConfig, TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override IEnumerable<string> YieldTokens(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }
        }
        /// <summary>
        /// [193]=selection_statement : 'switch' '(' expression ')' statement ;
        /// </summary>
        public class switch_ : Vnselection_statement {
            private readonly Token r4;
            private readonly Token r3;
            private readonly Vnexpression r2;
            private readonly Token r1;
            private readonly Vnstatement r0;

            /// <summary>
            /// [193]=selection_statement : 'switch' '(' expression ')' statement ;
            /// </summary>
            /// <param name="r4"></param>
            /// <param name="r3"></param>
            /// <param name="r2"></param>
            /// <param name="r1"></param>
            /// <param name="r0"></param>
            public switch_(Token r4/* reserved word is omissible */
                , Token r3/* reserved word is omissible */
                , Vnexpression r2
                , Token r1/* reserved word is omissible */
                , Vnstatement r0) {
                this.r4 = r4;
                this.r3 = r3;
                this.r2 = r2;
                this.r1 = r1;
                this.r0 = r0;
                this._scope = new TokenRange(r4, r0);
            }

            private TokenRange _scope;
            public override TokenRange Scope => _scope;

            public override void Format(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override void FullFormat(BlankConfig preConfig, TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override IEnumerable<string> YieldTokens(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }
        }

    }
}
